package com.service.impl;

import com.mapper.VipMapper;
import com.pojo.Vip;
import com.pojo.Vipaccount;
import com.service.VipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class VipServiceImpl implements VipService {
    @Autowired
    public VipMapper mapper;

    @Override
    public List<Vip> vipFindAll() {
        return mapper.vipFindAll();
    }

    @Override
    public List<Vip> vipFindLike(Integer vid, String vname,String grade) {
        return mapper.vipFindLike(vid, vname,grade);
    }

    @Override
    public int vipInsert(Vip vip) {
        return mapper.vipInsert(vip);
    }

    @Override
    public int vipaccountInsert(Vipaccount vipaccount) {
        return mapper.vipaccountInsert(vipaccount);
    }

    @Override
    public int vipupdate(Vip vip) {
        return mapper.vipupdate(vip);
    }

    @Override
    public int vipDelete(Integer vid) {
        return mapper.vipDelete(vid);
    }

    @Override
    public int vipaccountDelete(Integer vid) {
        return mapper.vipaccountDelete(vid);
    }


    @Override
    public List<Vip> vipSelectVid(Integer vid) {
        return mapper.vipSelectVid(vid);
    }
    @Override
    public List<Vip> vipSelectPhone(String vid) {
        return mapper.vipSelectPhone(vid);
    }

    @Override
    public int vipUpdintegral(Integer vid, Integer integral,String grade) {
        return mapper.vipUpdintegral(vid, integral,grade);
    }
}
